//
//  WRGestureView.h
//  WRGesturePassword
//
//  Created by 王然 on 16/6/24.
//  Copyright © 2016年 wangran. All rights reserved.
//

#import <UIKit/UIKit.h>

#define __SCREEN_HEIGHT     ([[UIScreen mainScreen] bounds].size.height)
#define __SCREEN_WIDTH      ([[UIScreen mainScreen] bounds].size.width)
#define __MAIN_RATIO_375      (([[UIScreen mainScreen] bounds].size.width)/375)

#define CircleBigMargin (__SCREEN_HEIGHT == 480 ? 30.0 * __MAIN_RATIO_375 : 40.0 * __MAIN_RATIO_375)     // 圆点间距离
#define CircleRadiusDouble ( __SCREEN_HEIGHT == 480 ? 50.0 * __MAIN_RATIO_375 : 64.0 * __MAIN_RATIO_375)  //原点直径
#define CircleBigLeft ((__SCREEN_WIDTH - ((CircleRadiusDouble * 3) + (CircleBigMargin * 2))) / 2)
#define GestureV_H (__SCREEN_WIDTH)

#define COLOR_RGBA(r,g,b,a) [UIColor colorWithRed:(r)/255.0f green:(g)/255.0f blue:(b)/255.0f alpha:(a)]

@protocol WRGestureDelegate <NSObject>

@required
- (void)GestureWithPasswordStr:(NSString *)str;

@end

@interface WRGestureView : UIView

@property (nonatomic , weak) id<WRGestureDelegate> delegate;

@property (nonatomic , assign) BOOL isTraOutOfPW;//是否显示密码轨迹,YES是显示轨迹 NO是不显示轨迹

/**
 初始化选择的坐标和颜色 normallC常规的颜色  selectC选中时的颜色  wrongC错误时选中的颜色 isTraOutPW是否显示密码轨迹,YES是显示轨迹 NO是不显示轨迹
 */
- (instancetype)initWithFrame:(CGRect)frame withNormallColor:(UIColor *)normalC withSelectColor:(UIColor *)selectC withWrongColor:(UIColor *)wrongC withIsTraOutPW:(BOOL)isTraOutPW;

- (void)showErrorClircles:(NSString *)string;//设置错误密码以展示

@end
